package com.example.chat.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.chat.beans.Mate;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface MateMapper extends BaseMapper<Mate> {
    Mate selectByUnMate(@Param("now") long now,
                        @Param("type") int type,
                        @Param("ids") String ids);

    List<Mate> selectExpire(@Param("now") long now);

    List<Mate> selectByUserId(@Param("userId")String userId);

    List<Mate> selectByUuid(@Param("uuid")String uuid,@Param("uuids")String uuids);

    Integer selectByUserIdNow(@Param("userId")String userId);

    Integer selectByUuidNow(@Param("uuid")String uuid,@Param("uuids")String uuids);

    void deleteExpire(@Param("now") long now);
}
